
// Boost Includes ==============================================================
#include <boost/python.hpp>
#include <boost/cstdint.hpp>

// Includes ====================================================================
#include <OpenSG/OSGShaderChunk.h>
#include <OpenSG/OSGShaderChunkBase.h>
#include <OsgPtrHelpers.h>

// Using =======================================================================
using namespace boost::python;

// Declarations ================================================================
namespace  {

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_ShaderChunk_dump_overloads_0_2, dump, 0, 2)


}// namespace


// Module ======================================================================
void Export_src_pyste_gen_ShaderChunk()
{
    scope* osg_ShaderChunkBase_scope = new scope(
    class_< osg::ShaderChunkBase, bases< osg::ShaderParameterChunk > , boost::noncopyable >("ShaderChunkBase", no_init)
//        .def_readonly("VertexProgramFieldMask", &osg::ShaderChunkBase::VertexProgramFieldMask)
//        .def_readonly("FragmentProgramFieldMask", &osg::ShaderChunkBase::FragmentProgramFieldMask)
//        .def_readonly("MTInfluenceMask", &osg::ShaderChunkBase::MTInfluenceMask)
        .def("getClassType", &osg::ShaderChunkBase::getClassType, return_internal_reference< 1 >())
        .def("getClassTypeId", &osg::ShaderChunkBase::getClassTypeId)
        .def("getType", (osg::FieldContainerType& (osg::ShaderChunkBase::*)() )&osg::ShaderChunkBase::getType, return_internal_reference< 1 >())
        .def("getType", (const osg::FieldContainerType& (osg::ShaderChunkBase::*)() const)&osg::ShaderChunkBase::getType, return_internal_reference< 1 >())
        .def("getContainerSize", &osg::ShaderChunkBase::getContainerSize)
        //.def("getVertexProgram", (std::string& (osg::ShaderChunkBase::*)() )&osg::ShaderChunkBase::getVertexProgram, return_value_policy< copy_const_reference >())
        .def("getVertexProgram", (const std::string& (osg::ShaderChunkBase::*)() const)&osg::ShaderChunkBase::getVertexProgram, return_value_policy< copy_const_reference >())
        //.def("getFragmentProgram", (std::string& (osg::ShaderChunkBase::*)() )&osg::ShaderChunkBase::getFragmentProgram, return_value_policy< copy_const_reference >())
        .def("getFragmentProgram", (const std::string& (osg::ShaderChunkBase::*)() const)&osg::ShaderChunkBase::getFragmentProgram, return_value_policy< copy_const_reference >())
        .def("setVertexProgram", &osg::ShaderChunkBase::setVertexProgram)
        .def("setFragmentProgram", &osg::ShaderChunkBase::setFragmentProgram)
        .def("getBinSize", &osg::ShaderChunkBase::getBinSize)
        .def("copyToBin", &osg::ShaderChunkBase::copyToBin)
        .def("copyFromBin", &osg::ShaderChunkBase::copyFromBin)
        .staticmethod("getClassType")
        .staticmethod("getClassTypeId")
    );

    scope().attr("VertexProgramFieldId") = (int)osg::ShaderChunkBase::VertexProgramFieldId;
    scope().attr("NextFieldId") = (int)osg::ShaderChunkBase::NextFieldId;
    scope().attr("FragmentProgramFieldId") = (int)osg::ShaderChunkBase::FragmentProgramFieldId;

    delete osg_ShaderChunkBase_scope;

    class_< osg::ShaderChunk, bases< osg::ShaderChunkBase > , boost::noncopyable, osg::ShaderChunkRefPtr >("ShaderChunk", no_init)
        .def("changed", &osg::ShaderChunk::changed)
        .def("dump", &osg::ShaderChunk::dump, osg_ShaderChunk_dump_overloads_0_2())
        .def("readVertexProgram", (bool (osg::ShaderChunk::*)(const char*) )&osg::ShaderChunk::readVertexProgram)
        .def("readVertexProgram", (bool (osg::ShaderChunk::*)(std::istream&) )&osg::ShaderChunk::readVertexProgram)
        .def("readFragmentProgram", (bool (osg::ShaderChunk::*)(const char*) )&osg::ShaderChunk::readFragmentProgram)
        .def("readFragmentProgram", (bool (osg::ShaderChunk::*)(std::istream&) )&osg::ShaderChunk::readFragmentProgram)
    ;


    register_ptr_to_python<osg::ShaderChunkPtr>();
    implicitly_convertible<osg::ShaderChunkRefPtr, osg::ShaderChunkPtr>();
    implicitly_convertible<osg::ShaderChunkPtr, osg::ShaderParameterChunkPtr>();

    def("RefPtr", &pyopensg::ToRefPtr<osg::ShaderChunkPtr>);
    def("FCPtr", &pyopensg::ToFcPtr<osg::ShaderChunkPtr>);
}

